﻿#ifndef ANSWERITEM_H
#define ANSWERITEM_H


#include <QVector>
#include <QPair>
#include <QStringList>

class answeritem
{
public:
    answeritem(QString qlabel,QStringList answers);
    answeritem();
    answeritem(const answeritem&ai);
    answeritem operator=(const answeritem&ai);
    ~answeritem();

    QString getLabel()const;
    bool setItems(QString item);
    QVector<QPair<QString,int>>& getItems();
    void setScore(int score);
    int getScore()const;
    unsigned getNum()const;
    bool getIsSigned()const;
    QStringList getAnswers()const;


private:
    QString m_qlabel;//题目标签
    unsigned m_num;//选项数目  根据选项的数目来调整下一行题目的位置
    QVector<QPair<QString,int>> m_items; //每个选项 int表示是否勾选
    QStringList m_answers;//有可能答案有多个,所以用QstringList
    bool isSigned; //判断是否为单选
    int score;     //设置题目分值
};

#endif // ANSWERITEM_H
